/**
 * Copyright (c) 2009-2011, chunquedong(YangJiandong)
 * 
 * This file is part of ChunMap project
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
 * 
 * History:
 *     2010-05-05  Jed Young  Creation
 */
package chunmap.app.bench;

import chunmap.app.MapCtrl;


/**
 * @author chunquedong
 * 
 */
public abstract class AbstractTool implements Tool {

	protected MapCtrl map;
	protected boolean active=true;

	@Override
	public void setActive(boolean active) {
		this.active=active;
	}
	
	public boolean isActive(){
		return active;
	}
	
	@Override
	public void onAdd(MapCtrl context) {
		this.map = context;
	}

	@Override
	public void onRemove() {
	}
	
	public String getId()
    {
        return this.getClass().getName();
    }
}